<div class="serch">
    <div class="m-subheader">
        <div class="row align-items-center">
            <div class="mr-auto col-auto">
                <h3 class="m-subheader__title m-subheader__title--separator">
                    <span>整箭缺料分析</span>
                </h3>
            </div>
        </div>
    </div>
    <div class="m-content">
        <div class="m-portlet m-portlet--mobile">
            <div class="m-portlet__body">
                <div class="p-formgroup-inline" style="margin-top:20px;">
                    <span class="p-field">
                        <span class="input-lable">型号：</span>
                        <p-dropdown filter="true" name="sstroeName" [options]="modelOption" placeholder="请选择型号"
                            [(ngModel)]="model" emptyFilterMessage="暂无数据" (onChange)="getLotNoList()">
                            <ng-template let-item pTemplate="selectedItem">
                                <span *ngIf="model != undefind "
                                    style="vertical-align:middle; margin-left: .5em;width: 147px;">{{item.label}}</span>
                                <span *ngIf="model == undefind "
                                    style="vertical-align:middle; margin-left: .5em;width: 147px;"> </span>
                            </ng-template>
                            <ng-template let-model pTemplate="item">
                                <div class="ui-helper-clearfix" style="position: relative;height: 25px;">
                                    <div style="font-size:14px;float:right;margin-top:4px;width: 147px;">{{model.label}}
                                    </div>
                                </div>
                            </ng-template>
                        </p-dropdown>
                    </span>
                    <span class="p-field ml">
                        <span class="input-lable">发次：</span>
                        <p-dropdown filter="true" name="sstroeName" [options]="LotNoList" placeholder="请选择发次"
                            [(ngModel)]="lotNo" emptyFilterMessage="暂无数据">
                            <ng-template let-item pTemplate="selectedItem">
                                <span *ngIf="lotNo != undefind "
                                    style="vertical-align:middle; margin-left: .5em;width: 147px;">{{item.label}}</span>
                                <span *ngIf="lotNo == undefind "
                                    style="vertical-align:middle; margin-left: .5em;width: 147px;"> </span>
                            </ng-template>
                            <ng-template let-model pTemplate="item">
                                <div class="ui-helper-clearfix" style="position: relative;height: 25px;">
                                    <div style="font-size:14px;float:right;margin-top:4px;width: 147px;">{{model.label}}
                                    </div>
                                </div>
                            </ng-template>
                        </p-dropdown>
                    </span>
                    <span class="p-field" style="margin-left: 20px;">
                        <span class="input-lable" style="margin-right: 20px;">物料类别：</span>
                        <input style="line-height: 24px!important;width: 150px;" id="model" type="text" size="30" pInputText
                            [(ngModel)]="materialPropertyName">
                    </span>
                    <span class="p-field" style="margin-left: 20px;">
                        <span class="input-lable" style="margin-right: 20px;">状态：</span>
                        <!-- <input style="line-height: 24px!important;" id="model"
                             type="text" size="30" pInputText [(ngModel)]="preSuiteStatus"> -->
                        <p-dropdown name="preSuiteStatus" [options]="cpreSuiteStatusOptions"
                            [(ngModel)]="preSuiteStatus" [filter]="true" filterBy="label"
                            placeholder="请选择预配套状态">
                        </p-dropdown>
                    </span>
                    <p-button label="查询" (onClick)="getTableList()" class="ml"></p-button>
                    <p-button label="重置" (onClick)="reset()" class="ml"></p-button>
                    <p-button *ngIf="'Pages.MaterialRocket.Export' | permission" label="导出" (onClick)="outExcel()" class="ml"></p-button>

                </div>
                <div class="row align-items-center" style="margin-top: 25px;">
                    <div class="primeng-datatable-container">
                        <p-table #dataTable [value]="primengTableHelper.records" (onLazyLoad)="getTableList($event)"
                            rows="{{primengTableHelper.defaultRecordsCountPerPage}}" [paginator]="false" [lazy]="true"
                            [scrollable]="true" ScrollWidth="100%" [responsive]="primengTableHelper.isResponsive"
                            [resizableColumns]="primengTableHelper.resizableColumns">
                            <ng-template pTemplate="header">
                                <tr>
                                    <th style="width: 80px;">序号</th>
                                    <th style="width: 150px">物料图号</th>
                                    <th style="width: 150px">物料名称</th>
                                    <th style="width: 150px">规格</th>
                                    <th style="width: 150px">物料类别</th>
                                    <th style="width: 150px">细类</th>
                                    <th style="width: 150px">单位</th>
                                    <th style="width: 150px">整箭用量</th>
                                    <th style="width: 150px">可用库存数量</th>
                                    <th style="width: 150px">预配套数量</th>
                                    <th style="width: 150px">缺料数量</th>
                                    <th style="width: 150px">出库数量</th>
                                    <th style="width: 150px">预配套状态</th>
                                    <!-- <th style="width: 150px">预配套人</th>
                                    <th style="width: 150px">创建日期</th> -->
                                </tr>
                            </ng-template>
                            <ng-template pTemplate="body" let-record="$implicit" let-rowIndex="rowIndex">
                                <tr>
                                    <td style="width: 80px;">{{rowIndex+1}}</td>
                                    <td style="width: 150px">{{record.materialNo}}</td>
                                    <td style="width: 150px">{{record.materialName}}</td>
                                    <td style="width: 150px">{{record.module}}</td>
                                    <td style="width: 150px">{{record.materialTypeName}}</td>
                                    <td style="width: 150px">{{record.materialCategoryName}}</td>
                                    <td style="width: 150px">{{record.unitName}}</td>
                                    <td style="width: 150px">{{record.bomDosageTotalAmount}}</td>
                                    <td style="width: 150px">{{record.usableQuantityStock}}</td>
                                    <td style="width: 150px">{{record.preSuiteStock}}</td>
                                    <td style="width: 150px">{{record.starvingStockAll}}</td>
                                    <td style="width: 150px">{{record.deliveryStockAll}}</td>
                                    <td style="width: 150px">{{record.preSuiteStatusName}}</td>
                                    <!-- <td style="width: 150px">{{record.createUserName}}</td>
                                    <td style="width: 150px">{{record.creationTime | momentFormat:'YYYY-MM-DD HH:mm:ss'}}</td> -->
                                </tr>
                            </ng-template>
                        </p-table>
                        <div class="primeng-paging-container">
                            <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage" #paginator
                                (onPageChange)="getTableList($event)"
                                [totalRecords]="primengTableHelper.totalRecordsCount"
                                [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">
                            </p-paginator>
                            <span class="total-records-count">
                                {{'TotalRecordsCount' | localize:primengTableHelper.totalRecordsCount}}
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>